Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove jQuery dependency #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

1rgs
Copy link

@1rgs 1rgs commented Apr 29, 2024

Removes the jQuery dependency from the project and replaces it with vanilla JavaScript for DOM manipulation and event handling.

  • Refactors js/script.js:

    • Replaces jQuery's $(document).ready() with vanilla JavaScript's document.addEventListener('DOMContentLoaded', ...).
    • Updates event handlers (click, success) to use document.querySelector and addEventListener instead of jQuery methods.
    • Modifies DOM manipulation to use document.querySelector and classList for adding/removing classes, and innerHTML for content changes.
    • Adjusts style changes from jQuery's .css() method to direct manipulation of the style property on elements.
  • Updates index.html:

    • Removes the <script> tag that included jquery-2.2.3.min.js, effectively eliminating the jQuery dependency from the project.

For more details, open the Copilot Workspace session.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant